package com.eve.service.impl;

import com.eve.entity.Picture;
import com.eve.mapper.PictureMapper;
import com.eve.service.PictureService;
import com.github.pagehelper.PageHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;


import java.util.List;
@Service
@Transactional
public class PictureServiceImpl implements PictureService  {

    @Autowired
    private PictureMapper pictureMapper;

    @Override
    public List<Picture> findByUserId(Integer id) {

        return pictureMapper.findByUserId(id);
    }

    @Override
    public void save(Picture picture) {

        pictureMapper.save(picture);
    }

    @Override
    public void deletePicture(Integer id) {
        pictureMapper.deletePicture(id);
    }

    @Override
    public List<Picture> listPicture() {
        return pictureMapper.listPicture();
    }

}
